﻿@{
    ViewBag.Title = "Form";
    Layout = "~/Views/Shared/_Form.cshtml";
}
<script>
    var keyValue = $.request("keyValue");
    $(function () {
        initControl();
        if (!!keyValue) {
            $.ajax({
                url: "/Article/Comment/GetFormJson",
                data: { keyValue: keyValue },
                dataType: "json",
                async: false,
                success: function (data) {
                    $("#form1").formSerialize(data);
                }
            });
        }
    });
    function initControl() {
        $("#F_OrganizeId").bindSelect({
            url: "/SystemManage/Organize/GetTreeSelectJson",
        });
    }
    function submitForm() {
        if (!$('#form1').formValid()) {
            return false;
        }
        $.submitForm({
            url: "/Article/Comment/SubmitForm?keyValue=" + keyValue,
            param: $("#form1").formSerialize(),
            success: function() {
                $.currentWindow().$("#gridList").trigger("reloadGrid");
            }
        });
    }
</script>

<form id="form1">
    <div style="padding-top: 20px; margin-right: 20px;">
        <table class="form">
            <tr>
                <th class="formTitle">文章编号</th>
                <td class="formValue">
                    <input id="F_ArticleId" name="F_ArticleId" type="text" class="form-control required" placeholder="" />
                </td>
            </tr>
            <tr>
                <th class="formTitle">文章标题</th>
                <td class="formValue">
                    <input id="F_ArticleTitle" name="F_ArticleTitle" type="text" class="form-control required" placeholder="" />
                </td>
            </tr>
            <tr>
                <th class="formTitle">评论</th>
                <td class="formValue">
                    <input id="F_Comment" name="F_Comment" type="text" class="form-control required" placeholder="" />
                </td>
            </tr>
            <tr>
                <th class="formTitle">审核状态</th>
                <td class="formValue">
                    <select id="F_State" name="F_State" class="form-control required">
                        <option value="0">未审核</option>
                        <option value="1">审核通过</option>
                        <option value="2">不通过</option>
                    </select>
                </td>
            </tr>
        </table>
    </div>
</form>
